/**
 * Project: d20Campaigner
 * Created: Sep 4, 2007 by bebopJMM
 */
package org.rollinitiative.d20.entity;

import org.rollinitiative.d20.schema.d20.AlignmentEnum;
/**
 * @author bebopJMM
 *
 */
public enum Alignment
{

  LG("Lawful Good"),
  NG("Neutral Good"),
  CG("Chaotic Good"),
  LN("Lawful Neutral"),
  TN("True Neutal"),
  CN("Chaotic Neutral"),
  LE("Lawful Evil"),
  NE("Neutral Evil"),
  CE("Chaotic Evil");
  
  private final String longName_;
  
  Alignment (String longName)
  {
	longName_ = longName;  
  }
  
  public String longName()
  {
	  return longName_;
  }
  
  public static Alignment mapAlignmentEnum (AlignmentEnum align)
  {
	  int alignVal = align.enumValue().intValue();
	  switch (alignVal) {
	  case AlignmentEnum.INT_LG:
		  return LG;
	  case AlignmentEnum.INT_NG:
		  return NG;
	  case AlignmentEnum.INT_CG:
		  return CG;
	  case AlignmentEnum.INT_LN:
		  return LN;
	  case AlignmentEnum.INT_TN:
		  return TN;
	  case AlignmentEnum.INT_CN:
		  return CN;
	  case AlignmentEnum.INT_LE:
		  return LE;
	  case AlignmentEnum.INT_NE:
		  return NE;
	  case AlignmentEnum.INT_CE:
		  return CE;
	  default:
		  return TN;
	  }
  }
}
